﻿using Basic.FlowApplication.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.FlowApplication.AuditLocalEvent.AuditEvent
{
    internal class MsgEvent : IEventHandler<FlowAuditEvent>
    {
        private readonly IAuditMsgService _AuditMsg;

        public MsgEvent ( IAuditMsgService auditMsg )
        {
            this._AuditMsg = auditMsg;
        }

        public void HandleEvent ( FlowAuditEvent data, string eventName )
        {
            this._AuditMsg.HandlerMsg(data.Log, data.Item, data.Flow);
        }
    }
}
